
import {Navigate} from 'react-router-dom'

interface UserProps{
    name?:string;
    passwd?:string;
    token:string;
}

function Stats({token,name,passwd}:UserProps){
    if(!token){
        return (
            <Navigate to="/login" replace/>
        );
    }
    return (
        <div style={{ padding: 20 }}>
        <h2>Stats View</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adip.</p>
      </div>
    );
}

export default Stats;